package gui;

import java.awt.Dimension;

import javax.swing.ImageIcon;
import javax.swing.JButton;

public class ToolBtn extends JButton{
	public ToolBtn(){
		super();
		this.initialize("");
	}
	
	public ToolBtn(String func){
		super();
		this.initialize(func);
	}
	
	private void initialize(String func){
		this.setPreferredSize(new Dimension(btnWid,btnWid));
		this.setIcon(new ImageIcon(
				"Icon/"+func+".png"));
		this.setToolTipText(func);
		this.func = func;
	}
	
	public String getFunc(){
		return this.func;
	}
	
	private static final int btnWid = 36;
	private String func;
}
